//index.js
//获取应用实例
const app = getApp()
var util = require("../../utils/libs.js")
var api = require("../../utils/api.js")
Page({
  data:{
    id:"",
    time:'',
    step: '',
    text_num:'',
    buildArticleDetail:{}
  },
  onLoad(options) {
    let that = this
    that.setData({
      id:options.id,
      time:options.time,
      text_num:options.text_num,
      step:options.step
    })
    util.request(api.buildArticleDetail, {id:that.data.id},
       "GET").then(function (res) {
      if (res.error_code === 0) {
        console.log(res)
        that.setData({
          buildArticleDetail:res.data.build_article
        })
      }
    })
  },
  addmend(){
    let that = this
    wx.navigateTo({
      url: "/pages/addreceive/addreceive?id="+that.data.id+"&& step="
  + that.data.step + "&&time=" + that.data.time + "&&text_num=" + that.data.text_num
    })
  }
})
